package sii.fb.emotion;

import java.util.List;
import java.util.Map;

import sii.fb.emotion.bean.Post;
import sii.fb.emotion.bean.User;
import sii.fb.emotion.computProbability.ProbabilityBasedOnAge;
import sii.fb.emotion.computProbability.ProbabilityBasedOnGender;
import sii.fb.emotion.computProbability.ProbabilityBasedOnPersonality;
import sii.fb.emotion.computProbability.ProbabilityBasedOnTime;
import sii.fb.emotion.computProbability.SupportMethod;
import sii.fb.emotion.fetch.DataFetch;

public class Main {
	/**
	 * @param args
	 */
	public static String print = "";
	public static void main(String[] args){
		DataFetch d = new DataFetch();
		SupportMethod sm = new SupportMethod();
		ProbabilityBasedOnGender pg = new ProbabilityBasedOnGender();
		ProbabilityBasedOnAge pa = new ProbabilityBasedOnAge();
		ProbabilityBasedOnTime pt = new ProbabilityBasedOnTime();
		ProbabilityBasedOnPersonality pp = new ProbabilityBasedOnPersonality();
		AssignEmotionPersonality de = new AssignEmotionPersonality();
		Map<Long, User> users = d.createUserList("users.txt");
		Map<Long, List<Post>> posts = d.createUser2Posts("posts.txt");
		Map<String,List<Integer>> word2cat = d.word2categories("LIWCItalian.diz");
		sm.computeInitialNumber(users, posts);
		de.AssignEmotionsAndPersonality(posts, word2cat, users);
		pg.gender2Emotion(users, posts);
		pa.age2Emotion(users, posts);
		pp.personality2Emotion(users, posts);
		pt.dayAndMonth2Emotion(posts);
		System.out.println(print);
	}

}
